﻿@model IEnumerable<StudentManagement.Models.Branch>

@{
    ViewBag.Title = "Branch List";
    Layout = "~/Views/Shared/_AdminNestedLayout.cshtml";
}
<!-- Branch create view link -->
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<!-- Branch grid list -->
<table class="grid">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ShortName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Description)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ShortName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Description)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.BranchId }) |
            @Html.ActionLink("Details", "Details", new { id=item.BranchId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.BranchId })
        </td>
    </tr>
}

</table>
<!-- Branch grid list -->